/*
 * @author: sanbao
 * @Date: 2022-07-28 21:18:17
 */
interface OrdersList {
    consignee_addr: string
    create_time: number
    is_send: string
    order_fapiao_company: string
    order_fapiao_content: string
    order_fapiao_title: string
    order_id: number
    order_number: string
    order_pay: string
    order_price: number
    pay_status: string
    trade_no: string
    update_time: number
    user_id: number
}

// tablelist
type tablelistInt = {
    type?: string
    label: string
    prop?: string
    width?: string
    list?: [
        {
            type: string
            action: string
            name: string
        },
        {
            type: string
            action: string
            name: string
        }
    ]
}
// 分页
interface pagerInt {
    currentPage: number
    pageSize: number
    total: number
    pageSizes: [number, number, number]
}

// top 内容
// toplist
type toplistInt = {
    type: string,
    model?: string,
    label?: string,
    action?: string,
    list?: [{
        type: string
        name: string
        action: string
    }]
}
export class OrderData {
    tableData: OrdersList[] = []
    //tablelist
    tablelist: tablelistInt[] = [
        {
            type: "index",
            label: "#",
        },
        {
            label: "订单编号",
            prop: "order_number",
            width: '600px'
        },
        {
            label: "订单价格",
            prop: "order_price",
        },
        {
            label: "是否付款",
            type: "pay_status",
        },
        {
            label: '是否发货',
            type: 'order_pay'
        },
        {
            label: '下单时间',
            prop: 'update_time'
        },
        {
            label: "操作",
            type: 'action',
            list: [{
                type: "primary",
                action: "edit",
                name: "编辑",
            },
            {
                type: "danger",
                action: "delete",
                name: "查看",
            }
            ]
        }
    ]
    // 分页
    pager: pagerInt = {
        currentPage: 1,
        pageSize: 5,
        total: 0,
        pageSizes: [5, 10, 15],
    }
    // top数据
    toplist: toplistInt[] = [
        {
            type: 'input',
            model: "seachVal",
            label: "请输入内容",
            action: "seach",
        },
        {
            type: "action",
            list: [
                {
                    type: 'primary',
                    name: "添加用户",
                    action: "add",
                }
            ]
        }
    ]

}